package cn.com.kgo.gateway.controller.usermanage;

import cn.com.kgo.common.api.usermanage.RoleService;
import cn.com.kgo.common.api.usermanage.UserService;
import cn.com.kgo.entity.usermanage.RoleEntity;
import cn.com.kgo.entity.usermanage.UserEntity;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keepgoon
 * @Description: TODO
 * @date 2019/5/1715:24
 */
@RestController
public class RoleController {
    @Reference
    private RoleService roleService;
    @GetMapping("/role")
    public String getUser(RoleEntity roleEntity){
        return roleService.getRole(roleEntity);
    }
   @RequestMapping(value = "/role",method = RequestMethod.PUT)
    public String addUser(RoleEntity role){
        return roleService.addRole(role);
    }
}
